package com.cqie.practicaltraining.dto;

import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiOperation("添加圈舍信息")
public class AddEnclosuresDto {
    private Long enclosuresId;
    @NotBlank(message = "圈舍名称不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_\\u4e00-\\u9fa5]+$", message = "圈舍名只能包含中文字符、字母、数字和下划线")
    private String enclosuresName;
    @NotBlank(message = "牧场名称不能为空")
    private String pastureName;
}
